import time
scale = 50
print("程序开始执行".center(scale//2, '-'))
t = time.perf_counter()                   #time.clock()在3.8中已经删除了所以我的3.9不能使用
for i in range(scale+1):
    a = '*' * i
    b = '.' * (scale - i)
    c = (i/scale) * 100
    t -= time.perf_counter()
    print("\r{:3.0f}%Starting{}->{}Done!{:.2f}s".format(c, a, b, -t), end='')
    time.sleep(0.05)
print("\n"+"执行结束".center(scale//2, '-'))
